home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // OleCtnrs.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
- // From: OleCtnrs.pas
- //----------------------------------------------------------------------------
- #ifndef OleCtnrsHPP
- #define OleCtnrsHPP
- //----------------------------------------------------------------------------
- #include <OleAuto.hpp>
- #include <Graphics.hpp>
- #include <Menus.hpp>
- #include <Forms.hpp>
- #include <Controls.hpp>
- #include <Classes.hpp>
- #include <SysUtils.hpp>
- #include <OleDlg.hpp>
- #include <OLE2.hpp>
- #include <CommCtrl.hpp>
- #include <Messages.hpp>
- #include <Windows.hpp>
- #include <System.hpp>
- #pragma warn -par
- #pragma warn -hid
- #pragma warn -inl
-
- namespace Olectnrs
- {
- //-- type declarations -------------------------------------------------------
- class __declspec(delphiclass) TOleClientSite;
- class __declspec(delphiclass) TOleContainer;
- class __declspec(delphiclass) TOleInPlaceSite;
- class __declspec(pascalimplementation) TOleInPlaceSite : public Ole2::IOleInPlaceSite
- {
- typedef Ole2::IOleInPlaceSite inherited;
-
- private:
- TOleContainer* FContainer;
-
- public:
- __fastcall TOleInPlaceSite(TOleContainer* Container);
- virtual long __stdcall QueryInterface(const GUID &iid, void *obj);
- virtual long __stdcall AddRef(void);
- virtual long __stdcall Release(void);
- virtual long __stdcall GetWindow(HWND &wnd);
- virtual long __stdcall ContextSensitiveHelp(DWord fEnterMode);
- virtual long __stdcall CanInPlaceActivate(void);
- virtual long __stdcall OnInPlaceActivate(void);
- virtual long __stdcall OnUIActivate(void);
- virtual long __stdcall GetWindowContext(Ole2::IOleInPlaceFrame* &frame, Ole2::IOleInPlaceUIWindow*
- &doc, Windows::TRect &rcPosRect, Windows::TRect &rcClipRect, OLEINPLACEFRAMEINFO &frameInfo);
- virtual long __stdcall Scroll(const POINT &scrollExtent);
- virtual long __stdcall OnUIDeactivate(DWord fUndoable);
- virtual long __stdcall OnInPlaceDeactivate(void);
- virtual long __stdcall DiscardUndoState(void);
- virtual long __stdcall DeactivateAndUndo(void);
- virtual long __stdcall OnPosRectChange(const Windows::TRect &rcPosRect);
- public:
- /* TObject.Destroy */ __fastcall virtual ~TOleInPlaceSite(void) { }
-
- };
-
- class __declspec(delphiclass) TAdviseSink;
- class __declspec(pascalimplementation) TAdviseSink : public Ole2::IAdviseSink
- {
- typedef Ole2::IAdviseSink inherited;
-
- private:
- TOleContainer* FContainer;
-
- public:
- __fastcall TAdviseSink(TOleContainer* Container);
- virtual long __stdcall QueryInterface(const GUID &iid, void *obj);
- virtual long __stdcall AddRef(void);
- virtual long __stdcall Release(void);
- virtual void __stdcall OnDataChange(FORMATETC &formatetc, STGMEDIUM &stgmed);
- virtual void __stdcall OnViewChange(long dwAspect, long lindex);
- virtual void __stdcall OnRename(Ole2::IMoniker* mk);
- virtual void __stdcall OnSave(void);
- virtual void __stdcall OnClose(void);
- public:
- /* TObject.Destroy */ __fastcall virtual ~TAdviseSink(void) { }
-
- };
-
- class __declspec(delphiclass) TOleForm;
- class __declspec(delphiclass) TOleInPlaceFrame;
- class __declspec(pascalimplementation) TOleInPlaceFrame : public Ole2::IOleInPlaceFrame
- {
- typedef Ole2::IOleInPlaceFrame inherited;
-
- private:
- TOleForm* FOleForm;
-
- public:
- __fastcall TOleInPlaceFrame(TOleForm* OleForm);
- virtual long __stdcall QueryInterface(const GUID &iid, void *obj);
- virtual long __stdcall AddRef(void);
- virtual long __stdcall Release(void);
- virtual long __stdcall GetWindow(HWND &wnd);
- virtual long __stdcall ContextSensitiveHelp(DWord fEnterMode);
- virtual long __stdcall GetBorder(Windows::TRect &rectBorder);
- virtual long __stdcall RequestBorderSpace(const Windows::TRect &borderwidths);
- virtual long __stdcall SetBorderSpace(Windows::PRect pborderwidths);
- virtual long __stdcall SetActiveObject(Ole2::IOleInPlaceActiveObject* activeObject, wchar_t * pszObjName
- );
- virtual long __stdcall InsertMenus(HMENU hmenuShared, OLEMENUGROUPWIDTHS &menuWidths);
- virtual long __stdcall SetMenu(HMENU hmenuShared, HMENU holemenu, HWND hwndActiveObject);
- virtual long __stdcall RemoveMenus(HMENU hmenuShared);
- virtual long __stdcall SetStatusText(wchar_t * pszStatusText);
- virtual long __stdcall EnableModeless(DWord fEnable);
- virtual long __stdcall TranslateAccelerator(MSG &msg, Word wID);
- public:
- /* TObject.Destroy */ __fastcall virtual ~TOleInPlaceFrame(void) { }
-
- };
-
- class __declspec(pascalimplementation) TOleForm : public Forms::TOleFormObject
- {
- typedef Forms::TOleFormObject inherited;
-
- private:
- int FRefCount;
- Forms::TForm* FForm;
- TOleInPlaceFrame* FOleInPlaceFrame;
- Classes::TList* FContainers;
- Ole2::IOleInPlaceActiveObject* FActiveObject;
- int FSaveWidth;
- int FSaveHeight;
- Classes::TList* FHiddenControls;
- Controls::TControl* FSpacers[4];
- long __fastcall AddRef(void);
- bool __fastcall BorderSpaceAvailable(const Windows::TRect &BorderWidths);
- void __fastcall ClearBorderSpace(void);
- void __fastcall GetBorder(Windows::TRect &BorderRect);
- bool __fastcall IsSpacer(Controls::TControl* Control);
- bool __fastcall IsToolControl(Controls::TControl* Control);
- long __fastcall Release(void);
- void __fastcall SetActiveObject(Ole2::IOleInPlaceActiveObject* ActiveObject);
- bool __fastcall SetBorderSpace(const Windows::TRect &BorderWidths);
-
- protected:
- virtual void __fastcall OnDestroy(void);
- virtual void __fastcall OnResize(void);
-
- public:
- __fastcall TOleForm(Forms::TForm* Form);
- __fastcall virtual ~TOleForm(void);
- };
-
- enum TAutoActivate { aaManual, aaGetFocus, aaDoubleClick };
-
- enum TSizeMode { smClip, smCenter, smScale, smStretch, smAutoSize };
-
- typedef void __fastcall (__closure *TObjectMoveEvent)(TOleContainer* OleContainer, const Windows::TRect
- &Bounds);
-
- enum TObjectState { osEmpty, osLoaded, osRunning, osOpen, osInPlaceActive, osUIActive };
-
- struct TCreateInfo;
- class __declspec(pascalimplementation) TOleContainer : public Controls::TCustomControl
- {
- typedef Controls::TCustomControl inherited;
-
- private:
- long FRefCount;
- Ole2::ILockBytes* FLockBytes;
- Ole2::IStorage* FStorage;
- Ole2::IOleObject* FOleObject;
- TOleClientSite* FOleClientSite;
- TOleInPlaceSite* FOleInPlaceSite;
- TAdviseSink* FAdviseSink;
- long FDrawAspect;
- POINT FViewSize;
- Classes::TStringList* FObjectVerbs;
- long FDataConnection;
- TOleForm* FDocForm;
- TOleForm* FFrameForm;
- Ole2::IOleInPlaceObject* FOleInPlaceObject;
- Ole2::IOleInPlaceActiveObject* FOleInPlaceActiveObject;
- HACCEL FAccelTable;
- int FAccelCount;
- Menus::TPopupMenu* FPopupVerbMenu;
- bool FAllowInPlace;
- TAutoActivate FAutoActivate;
- bool FAutoVerbMenu;
- TFormBorderStyle FBorderStyle;
- bool FCopyOnSave;
- bool FOldStreamFormat;
- TSizeMode FSizeMode;
- bool FObjectOpen;
- bool FUIActive;
- bool FModified;
- bool FModSinceSave;
- bool FFocused;
- bool FNewInserted;
- Classes::TNotifyEvent FOnActivate;
- Classes::TNotifyEvent FOnDeactivate;
- TObjectMoveEvent FOnObjectMove;
- Classes::TNotifyEvent FOnResize;
- long __fastcall AddRef(void);
- void __fastcall AdjustBounds(void);
- void __fastcall CheckObject(void);
- void __fastcall CreateAccelTable(void);
- void __fastcall CreateStorage(void);
- void __fastcall DesignModified(void);
- void __fastcall DestroyAccelTable(void);
- void __fastcall DestroyVerbs(void);
- int __fastcall GetBorderWidth(void);
- bool __fastcall GetCanPaste(void);
- bool __fastcall GetIconic(void);
- bool __fastcall GetLinked(void);
- int __fastcall GetObjectDataSize(void);
- Classes::TStrings* __fastcall GetObjectVerbs(void);
- System::AnsiString __fastcall GetOleClassName(void);
- System::Variant __fastcall GetOleObject(void);
- int __fastcall GetPrimaryVerb(void);
- System::AnsiString __fastcall GetSourceDoc(void);
- TObjectState __fastcall GetState(void);
- void __fastcall InitObject(void);
- void __fastcall ObjectModified(void);
- void __fastcall ObjectMoved(const Windows::TRect &ObjectRect);
- void __fastcall ObjectShowWindow(bool Show);
- void __fastcall ObjectViewChange(long Aspect);
- void __fastcall PopupVerbMenuClick(System::TObject* Sender);
- long __fastcall QueryInterface(const GUID &iid, void *obj);
- long __fastcall Release(void);
- void __fastcall SaveObject(void);
- void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
- void __fastcall SetDrawAspect(bool Iconic, int IconMetaPict);
- void __fastcall SetFocused(bool Value);
- void __fastcall SetIconic(bool Value);
- void __fastcall SetSizeMode(TSizeMode Value);
- void __fastcall SetUIActive(bool Active);
- void __fastcall SetViewAdviseSink(bool Enable);
- void __fastcall UpdateObjectRect(void);
- void __fastcall UpdateView(void);
- HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
- MESSAGE void __fastcall CMDocWindowActivate(Messages::TMessage &Message);
- MESSAGE void __fastcall CMUIDeactivate(Messages::TMessage &Message);
- HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMSetFocus &Message);
- HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
- HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- HIDESBASE MESSAGE void __fastcall WMWindowPosChanged(Messages::TWMWindowPosMsg &Message);
-
- protected:
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- virtual void __fastcall DblClick(void);
- virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
- virtual void __fastcall DoEnter(void);
- virtual Menus::TPopupMenu* __fastcall GetPopupMenu(void);
- virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- virtual void __fastcall Paint(void);
-
- public:
- __fastcall virtual TOleContainer(Classes::TComponent* AOwner);
- __fastcall virtual ~TOleContainer(void);
- bool __fastcall ChangeIconDialog(void);
- void __fastcall Close(void);
- void __fastcall Copy(void);
- void __fastcall CreateLinkToFile(const System::AnsiString FileName, bool Iconic);
- void __fastcall CreateObject(const System::AnsiString OleClassName, bool Iconic);
- void __fastcall CreateObjectFromFile(const System::AnsiString FileName, bool Iconic);
- void __fastcall CreateObjectFromInfo(const TCreateInfo &CreateInfo);
- void __fastcall DestroyObject(void);
- void __fastcall DoVerb(int Verb);
- int __fastcall GetIconMetaPict(void);
- bool __fastcall InsertObjectDialog(void);
- void __fastcall LoadFromFile(const System::AnsiString FileName);
- void __fastcall LoadFromStream(Classes::TStream* Stream);
- bool __fastcall ObjectPropertiesDialog(void);
- void __fastcall Paste(void);
- bool __fastcall PasteSpecialDialog(void);
- void __fastcall Run(void);
- void __fastcall SaveToFile(const System::AnsiString FileName);
- void __fastcall SaveToStream(Classes::TStream* Stream);
- void __fastcall UpdateObject(void);
- void __fastcall UpdateVerbs(void);
- __property bool CanPaste = {read=GetCanPaste, nodefault};
- __property bool Linked = {read=GetLinked, nodefault};
- __property bool Modified = {read=FModified, write=FModified, nodefault};
- __property bool NewInserted = {read=FNewInserted, nodefault};
- __property Classes::TStrings* ObjectVerbs = {read=GetObjectVerbs, nodefault};
- __property System::AnsiString OleClassName = {read=GetOleClassName, nodefault};
- __property System::Variant OleObject = {read=GetOleObject};
- __property Ole2::IOleObject* OleObjectInterface = {read=FOleObject, nodefault};
- __property int PrimaryVerb = {read=GetPrimaryVerb, nodefault};
- __property System::AnsiString SourceDoc = {read=GetSourceDoc, nodefault};
- __property TObjectState State = {read=GetState, nodefault};
- __property Ole2::IStorage* StorageInterface = {read=FStorage, nodefault};
-
- __published:
- __property bool AllowInPlace = {read=FAllowInPlace, write=FAllowInPlace, default=1};
- __property TAutoActivate AutoActivate = {read=FAutoActivate, write=FAutoActivate, default=2};
- __property bool AutoVerbMenu = {read=FAutoVerbMenu, write=FAutoVerbMenu, default=1};
- __property Align ;
- __property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
- __property Caption ;
- __property Color ;
- __property bool CopyOnSave = {read=FCopyOnSave, write=FCopyOnSave, default=1};
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property bool Iconic = {read=GetIconic, write=SetIconic, stored=false, nodefault};
- __property bool OldStreamFormat = {read=FOldStreamFormat, write=FOldStreamFormat, default=0};
- __property ParentColor ;
- __property ParentCtl3D ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property ShowHint ;
- __property TSizeMode SizeMode = {read=FSizeMode, write=SetSizeMode, default=0};
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property Classes::TNotifyEvent OnActivate = {read=FOnActivate, write=FOnActivate};
- __property Classes::TNotifyEvent OnDeactivate = {read=FOnDeactivate, write=FOnDeactivate};
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property TObjectMoveEvent OnObjectMove = {read=FOnObjectMove, write=FOnObjectMove};
- __property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
- __property OnStartDrag ;
- public:
- /* TWinControl.CreateParented */ __fastcall TOleContainer(HWND ParentWindow) : Controls::TCustomControl(
- ParentWindow) { }
-
- };
-
- class __declspec(pascalimplementation) TOleClientSite : public Ole2::IOleClientSite
- {
- typedef Ole2::IOleClientSite inherited;
-
- private:
- TOleContainer* FContainer;
-
- public:
- __fastcall TOleClientSite(TOleContainer* Container);
- virtual long __stdcall QueryInterface(const GUID &iid, void *obj);
- virtual long __stdcall AddRef(void);
- virtual long __stdcall Release(void);
- virtual long __stdcall SaveObject(void);
- virtual long __stdcall GetMoniker(long dwAssign, long dwWhichMoniker, Ole2::IMoniker* &mk);
- virtual long __stdcall GetContainer(Ole2::IOleContainer* &container);
- virtual long __stdcall ShowObject(void);
- virtual long __stdcall OnShowWindow(DWord fShow);
- virtual long __stdcall RequestNewObjectLayout(void);
- public:
- /* TObject.Destroy */ __fastcall virtual ~TOleClientSite(void) { }
-
- };
-
- enum TCreateType { ctNewObject, ctFromFile, ctLinkToFile, ctFromData, ctLinkFromData };
-
- struct TCreateInfo
- {
- TCreateType CreateType;
- bool ShowAsIcon;
- int IconMetaPict;
- GUID ClassID;
- System::AnsiString FileName;
- Ole2::IDataObject* DataObject;
- } ;
-
- struct TVerbInfo
- {
- short Verb;
- Word Flags;
- } ;
-
- //-- var, const, procedure ---------------------------------------------------
- #define ovShow (Shortint)(-1)
- #define ovOpen (Shortint)(-2)
- #define ovHide (Shortint)(-3)
- #define ovUIActivate (Shortint)(-4)
- #define ovInPlaceActivate (Shortint)(-5)
- #define ovDiscardUndoState (Shortint)(-6)
- #define ovPrimary (int)(-65536)
- extern void __fastcall DestroyMetaPict(int MetaPict);
-
- } /* namespace Olectnrs */
-
- #pragma warn .par
- #pragma warn .hid
- #pragma warn .inl
-
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Olectnrs;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // OleCtnrs
-